class Garden
  include MongoMapper::Document
  key :name, String
  key :desc, String
  key :user_ids, Array
  many :users, :in => :user_ids


  def add_user(user)
    if @users==nil
      @users = []
      @user_ids = []
    end
    @users <<  user
    @user_ids << user.name;
  end

  def self.find_gardens_for_user
    Garden.find();
  end
end
